package thrift;

import org.apache.thrift.TException;
import org.apache.thrift.protocol.TBinaryProtocol;
import org.apache.thrift.protocol.TProtocol;
import org.apache.thrift.transport.TSocket;
import org.apache.thrift.transport.TTransport;
import org.apache.thrift.transport.TTransportException;
import tutorial.Calculator;

/**
 * Created with IntelliJ IDEA.
 * MyUser: belict
 * Date: 11/30/13
 * Time: 6:26 PM
 * To change this template use File | Settings | File Templates.
 */
public class Client {

    public static void main(String[] args) throws TException {
        TTransport transport = new TSocket("localhost",9090);
        transport.open();
        TProtocol protocol = new TBinaryProtocol(transport);
        Calculator.Client client = new Calculator.Client(protocol);

        client.ping();

        client.add(120,329);
    }

}
